<!DOCTYPE html>
<html lang="en">
  <head>
    <title>JWTVerifier Structure Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset="utf-8">
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>

    <a name="//apple_ref/swift/Struct/JWTVerifier" class="dashAnchor"></a>

    <a title="JWTVerifier Structure Reference"></a>

    <header class="header">
      <p class="header-col header-col--primary">
        <a class="header-link" href="../index.html">
          SwiftJWT 3.6.200 Docs
        </a>
         (100% documented)
      </p>
    
      <p class="header-col--secondary">
        <form role="search" action="../search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>
      </p>
    
        <p class="header-col header-col--secondary">
          <a class="header-link" href="https://github.com/Kitura/Swift-JWT/">
            <img class="header-icon" src="../img/gh.png"/>
            View on GitHub
          </a>
        </p>
    
    </header>

    <p class="breadcrumbs">
      <a class="breadcrumb" href="../index.html">SwiftJWT Reference</a>
      <img class="carat" src="../img/carat.png" />
      JWTVerifier Structure Reference
    </p>

    <div class="content-wrapper">
      <nav class="navigation">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ClaimsMicroProfile.html">ClaimsMicroProfile</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ClaimsOpenID.html">ClaimsOpenID</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/ClaimsStandardJWT.html">ClaimsStandardJWT</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/JWTDecoder.html">JWTDecoder</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Classes/JWTEncoder.html">JWTEncoder</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Protocols/Claims.html">Claims</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a class="nav-group-name-link" href="../Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/AddressClaim.html">AddressClaim</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/Header.html">Header</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/JWT.html">JWT</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/JWTError.html">JWTError</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/JWTSigner.html">JWTSigner</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/JWTVerifier.html">JWTVerifier</a>
              </li>
              <li class="nav-group-task">
                <a class="nav-group-task-link" href="../Structs/ValidateClaimsResult.html">ValidateClaimsResult</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">

        <section class="section">
          <div class="section-content top-matter">
            <h1>JWTVerifier</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">JWTVerifier</span></code></pre>

                </div>
              </div>
            <p>A struct that will be used to verify the signature of a JWT is valid for the provided <code><a href="../Structs/Header.html">Header</a></code> and <code><a href="../Protocols/Claims.html">Claims</a></code>.
For RSA and ECDSA, the provided key should be a .utf8 encoded PEM String.</p>
<h3 id='usage-example' class='heading'>Usage Example:</h3>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">pemString</span> <span class="o">=</span> <span class="s">"""
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDdlatRjRjogo3WojgGHFHYLugd
UWAY9iR3fy4arWNA1KoS8kVw33cJibXr8bvwUAUparCwlvdbH6dvEOfou0/gCFQs
HUfQrSDv+MuSUMAe8jzKE4qW+jK+xQU9a03GUnKHkkle+Q0pX/g6jXZ7r1/xAK5D
o2kQ+X5xK9cipRgEKwIDAQAB
-----END PUBLIC KEY-----
"""</span>
<span class="k">let</span> <span class="nv">signedJWT</span> <span class="o">=</span> <span class="s">"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiS2l0dXJhIn0.o2Rv_w1W6qfkldgb6FwzC3tAFEzo7WyYcLyykijCEqDbW8A7TwoFev85KGo_Bi7eNaSgZ6Q8jgkA31r8EDQWtSRg3_o5Zlq-ZCndyVeibgbyM2BMVUGcGzkUD2ikARfnb6GNGHr2waVeFSDehTN8WTLl0mGFxUE6wx5ZugR7My0"</span>
<span class="kd">struct</span> <span class="kt">MyClaims</span><span class="p">:</span> <span class="kt">Claims</span> <span class="p">{</span>
   <span class="k">var</span> <span class="nv">name</span><span class="p">:</span> <span class="kt">String</span>
<span class="p">}</span>
<span class="k">let</span> <span class="nv">jwt</span> <span class="o">=</span> <span class="kt">JWT</span><span class="p">(</span><span class="nv">claims</span><span class="p">:</span> <span class="kt">MyClaims</span><span class="p">(</span><span class="nv">name</span><span class="p">:</span> <span class="s">"Kitura"</span><span class="p">))</span>
<span class="k">let</span> <span class="nv">publicKey</span> <span class="o">=</span> <span class="n">pemString</span><span class="o">.</span><span class="nf">data</span><span class="p">(</span><span class="nv">using</span><span class="p">:</span> <span class="o">.</span><span class="n">utf8</span><span class="p">)</span><span class="o">!</span>
<span class="k">let</span> <span class="nv">jwtVerifier</span> <span class="o">=</span> <span class="kt">JWTVerifier</span><span class="o">.</span><span class="nf">rs256</span><span class="p">(</span><span class="nv">publicKey</span><span class="p">:</span> <span class="n">publicKey</span><span class="p">)</span>
<span class="k">let</span> <span class="nv">verified</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="n">jwt</span><span class="o">.</span><span class="nf">verify</span><span class="p">(</span><span class="n">signedJWT</span><span class="p">,</span> <span class="nv">using</span><span class="p">:</span> <span class="n">jwtVerifier</span><span class="p">)</span>
</code></pre>

          </div>
        </section>

        <section class="section">
          <div class="section-content">
            <div class="task-group">
              <ul class="item-container">
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5rs2569publicKeyAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/rs256(publicKey:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5rs2569publicKeyAC10Foundation4DataV_tFZ">rs256(publicKey:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTVerifier using the RSA 256 bits algorithm and the provided publicKey.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">rs256</span><span class="p">(</span><span class="nv">publicKey</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>publicKey</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The UTF8 encoded PEM public key, with a &ldquo;BEGIN PUBLIC KEY&rdquo; header.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5rs3849publicKeyAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/rs384(publicKey:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5rs3849publicKeyAC10Foundation4DataV_tFZ">rs384(publicKey:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTVerifier using the RSA 384 bits algorithm and the provided publicKey.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">rs384</span><span class="p">(</span><span class="nv">publicKey</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>publicKey</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The UTF8 encoded PEM public key, with a &ldquo;BEGIN PUBLIC KEY&rdquo; header.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5rs5129publicKeyAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/rs512(publicKey:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5rs5129publicKeyAC10Foundation4DataV_tFZ">rs512(publicKey:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTVerifier using the RSA 512 bits algorithm and the provided publicKey.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">rs512</span><span class="p">(</span><span class="nv">publicKey</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>publicKey</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The UTF8 encoded PEM public key, with a &ldquo;BEGIN PUBLIC KEY&rdquo; header.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5rs25611certificateAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/rs256(certificate:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5rs25611certificateAC10Foundation4DataV_tFZ">rs256(certificate:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTVerifier using the RSA 256 bits algorithm and the provided certificate.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">rs256</span><span class="p">(</span><span class="nv">certificate</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>publicKey</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The UTF8 encoded PEM public key, with a &ldquo;BEGIN CERTIFICATE&rdquo; header.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5rs38411certificateAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/rs384(certificate:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5rs38411certificateAC10Foundation4DataV_tFZ">rs384(certificate:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTVerifier using the RSA 384 bits algorithm and the provided certificate.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">rs384</span><span class="p">(</span><span class="nv">certificate</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>publicKey</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The UTF8 encoded PEM public key, with a &ldquo;BEGIN CERTIFICATE&rdquo; header.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5rs51211certificateAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/rs512(certificate:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5rs51211certificateAC10Foundation4DataV_tFZ">rs512(certificate:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTVerifier using the RSA 512 bits algorithm and the provided certificate.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">rs512</span><span class="p">(</span><span class="nv">certificate</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>publicKey</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The UTF8 encoded PEM public key, with a &ldquo;BEGIN CERTIFICATE&rdquo; header.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5ps2569publicKeyAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/ps256(publicKey:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5ps2569publicKeyAC10Foundation4DataV_tFZ">ps256(publicKey:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTVerifier using the RSA-PSS 256 bits algorithm and the provided publicKey.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">ps256</span><span class="p">(</span><span class="nv">publicKey</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>publicKey</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The UTF8 encoded PEM public key, with a &ldquo;BEGIN PUBLIC KEY&rdquo; header.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5ps3849publicKeyAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/ps384(publicKey:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5ps3849publicKeyAC10Foundation4DataV_tFZ">ps384(publicKey:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTVerifier using the RSA-PSS 384 bits algorithm and the provided publicKey.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">ps384</span><span class="p">(</span><span class="nv">publicKey</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>publicKey</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The UTF8 encoded PEM public key, with a &ldquo;BEGIN PUBLIC KEY&rdquo; header.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5ps5129publicKeyAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/ps512(publicKey:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5ps5129publicKeyAC10Foundation4DataV_tFZ">ps512(publicKey:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTVerifier using the RSA-PSS 512 bits algorithm and the provided publicKey.
This verifier requires at least a 2048 bit RSA key.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">ps512</span><span class="p">(</span><span class="nv">publicKey</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>publicKey</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The UTF8 encoded PEM public key, with a &ldquo;BEGIN PUBLIC KEY&rdquo; header.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5hs2563keyAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/hs256(key:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5hs2563keyAC10Foundation4DataV_tFZ">hs256(key:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTSigner using the HMAC 256 bits algorithm and the provided privateKey.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">hs256</span><span class="p">(</span><span class="nv">key</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>key</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The HMAC symmetric password data.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5hs3843keyAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/hs384(key:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5hs3843keyAC10Foundation4DataV_tFZ">hs384(key:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTSigner using the HMAC 384 bits algorithm and the provided privateKey.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">hs384</span><span class="p">(</span><span class="nv">key</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>key</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The HMAC symmetric password data.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5hs5123keyAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/hs512(key:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5hs5123keyAC10Foundation4DataV_tFZ">hs512(key:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTSigner using the HMAC 512 bits algorithm and the provided privateKey.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">hs512</span><span class="p">(</span><span class="nv">key</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>key</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The HMAC symmetric password data.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5es2569publicKeyAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/es256(publicKey:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5es2569publicKeyAC10Foundation4DataV_tFZ">es256(publicKey:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTVerifier using the ECDSA SHA 256 algorithm and the provided public key.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@available</span><span class="p">(</span><span class="n">macOS</span> <span class="mf">10.13</span><span class="p">,</span> <span class="n">iOS</span> <span class="mi">11</span><span class="p">,</span> <span class="n">tvOS</span> <span class="mf">11.0</span><span class="p">,</span> <span class="n">watchOS</span> <span class="mf">4.0</span><span class="p">,</span> <span class="o">*</span><span class="p">)</span>
<span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">es256</span><span class="p">(</span><span class="nv">publicKey</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>publicKey</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The UTF8 encoded PEM public key, with a &ldquo;BEGIN PUBLIC KEY&rdquo; header.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5es3849publicKeyAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/es384(publicKey:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5es3849publicKeyAC10Foundation4DataV_tFZ">es384(publicKey:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTVerifier using the ECDSA SHA 384 algorithm and the provided public key.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@available</span><span class="p">(</span><span class="n">macOS</span> <span class="mf">10.13</span><span class="p">,</span> <span class="n">iOS</span> <span class="mi">11</span><span class="p">,</span> <span class="n">tvOS</span> <span class="mf">11.0</span><span class="p">,</span> <span class="n">watchOS</span> <span class="mf">4.0</span><span class="p">,</span> <span class="o">*</span><span class="p">)</span>
<span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">es384</span><span class="p">(</span><span class="nv">publicKey</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>publicKey</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The UTF8 encoded PEM public key, with a &ldquo;BEGIN PUBLIC KEY&rdquo; header.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV5es5129publicKeyAC10Foundation4DataV_tFZ"></a>
                    <a name="//apple_ref/swift/Method/es512(publicKey:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV5es5129publicKeyAC10Foundation4DataV_tFZ">es512(publicKey:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTVerifier using the ECDSA SHA 512 algorithm and the provided public key.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">@available</span><span class="p">(</span><span class="n">macOS</span> <span class="mf">10.13</span><span class="p">,</span> <span class="n">iOS</span> <span class="mi">11</span><span class="p">,</span> <span class="n">tvOS</span> <span class="mf">11.0</span><span class="p">,</span> <span class="n">watchOS</span> <span class="mf">4.0</span><span class="p">,</span> <span class="o">*</span><span class="p">)</span>
<span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">es512</span><span class="p">(</span><span class="nv">publicKey</span><span class="p">:</span> <span class="kt">Data</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>publicKey</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>The UTF8 encoded PEM public key, with a &ldquo;BEGIN PUBLIC KEY&rdquo; header.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:8SwiftJWT11JWTVerifierV4noneACvpZ"></a>
                    <a name="//apple_ref/swift/Variable/none" class="dashAnchor"></a>
                    <a class="token" href="#/s:8SwiftJWT11JWTVerifierV4noneACvpZ">none</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initialize a JWTVerifier that will always return true when verifying the JWT. This is equivelent to using the &ldquo;none&rdquo; alg header.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">let</span> <span class="nv">none</span><span class="p">:</span> <span class="kt">JWTVerifier</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </section>

      </article>
    </div>
    <section class="footer">
      <p>&copy; 2020 <a class="link" href="https://github.com/Kitura/Swift-JWT" target="_blank" rel="external">IBM &amp; Kitura Project Contributors</a>. All rights reserved. (Last updated: 2020-11-25)</p>
      <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.6</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
    </section>
  </body>
</div>
</html>
